<html>
<head><meta charset="utf-8"><title>Assigning to `ManuallyDrop` union fields can be safe · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Assigning.20to.20.60ManuallyDrop.60.20union.20fields.20can.20be.20safe.html">Assigning to `ManuallyDrop` union fields can be safe</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213703352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Assigning%20to%20%60ManuallyDrop%60%20union%20fields%20can%20be%20safe/near/213703352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Assigning.20to.20.60ManuallyDrop.60.20union.20fields.20can.20be.20safe.html#213703352">(Oct 18 2020 at 11:58)</a>:</h4>
<p>Is FCP enough for such a change? <a href="https://github.com/rust-lang/rust/pull/78068">https://github.com/rust-lang/rust/pull/78068</a></p>



<a name="213706399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Assigning%20to%20%60ManuallyDrop%60%20union%20fields%20can%20be%20safe/near/213706399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Assigning.20to.20.60ManuallyDrop.60.20union.20fields.20can.20be.20safe.html#213706399">(Oct 18 2020 at 13:27)</a>:</h4>
<p>Oh yes, more things in that direction, please! For instance, it would be nice to have <code>union</code>s with only <code>Copy</code>-or-<code>ManuallyDrop</code> fields be usable  in <em>stable</em> Rust (excessive <code>unsafe</code>-ty can be dealt with; unstability cannot).</p>



<a name="213707049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Assigning%20to%20%60ManuallyDrop%60%20union%20fields%20can%20be%20safe/near/213707049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Assigning.20to.20.60ManuallyDrop.60.20union.20fields.20can.20be.20safe.html#213707049">(Oct 18 2020 at 13:43)</a>:</h4>
<blockquote>
<p>usable in stable Rust</p>
</blockquote>
<p>I think that was stabilized just days ago. :)</p>



<a name="213710410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Assigning%20to%20%60ManuallyDrop%60%20union%20fields%20can%20be%20safe/near/213710410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Assigning.20to.20.60ManuallyDrop.60.20union.20fields.20can.20be.20safe.html#213710410">(Oct 18 2020 at 15:07)</a>:</h4>
<p><span class="user-mention" data-user-id="232018">@Daniel Henry-Mantilla</span> you mean like <a href="https://github.com/rust-lang/rust/pull/77547">https://github.com/rust-lang/rust/pull/77547</a> ? ;)</p>



<a name="213710968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Assigning%20to%20%60ManuallyDrop%60%20union%20fields%20can%20be%20safe/near/213710968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Assigning.20to.20.60ManuallyDrop.60.20union.20fields.20can.20be.20safe.html#213710968">(Oct 18 2020 at 15:19)</a>:</h4>
<p>Embarrassing <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span>   but delighted to see that happening <span aria-label="heart eyes" class="emoji emoji-1f60d" role="img" title="heart eyes">:heart_eyes:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>